Skip to content

feat: Enable single stack deployments in Helm chart#828

Open
jochenseeber wants to merge 1 commit intoopenebs:developfrom
CaperWhite:develop
Open

feat: Enable single stack deployments in Helm chart#828
jochenseeber wants to merge 1 commit intoopenebs:developfrom
CaperWhite:develop

Conversation

@jochenseeber
Copy link
Copy Markdown
Contributor

@jochenseeber jochenseeber commented Mar 31, 2026

Description

Add a global ipFamily setting to the Helm chart that controls IP family
configuration for all chart-managed Kubernetes Services and adjusts container
bind addresses accordingly.

The setting accepts three values:

  • ipv4 -- IPv4 SingleStack, services bind to 0.0.0.0
  • ipv6 -- IPv6 SingleStack, services bind to ::
  • both (default) -- PreferDualStack with IPv4 and IPv6, services bind to ::

Two new helper templates are added to _helpers.tpl:

  • service_ip_family -- generates ipFamilyPolicy and ipFamilies fields
    for Service specs
  • bind_address -- returns the appropriate bind address (0.0.0.0 or ::)

All four chart-managed Services now include the service_ip_family helper,
and four hardcoded [::] bind addresses in container args are replaced with
the bind_address helper.

Invalid values (including empty string) are rejected at template time with an error message.

Motivation and Context

The chart previously hardcoded [::] as the bind address and did not set
ipFamilyPolicy or ipFamilies on any Service. This made deployments on
IPv4-only fail, with no way to correctly configure the components.

Regression

No

How Has This Been Tested?

Verified with helm template for all supported values:

  • Default (both): All 4 Services render with ipFamilyPolicy: PreferDualStack and ipFamilies: [IPv4, IPv6]. Bind addresses render as
    [::].
  • ipv4: All 4 Services render with ipFamilyPolicy: SingleStack and
    ipFamilies: [IPv4]. Bind addresses render as [0.0.0.0].
  • ipv6: All 4 Services render with ipFamilyPolicy: SingleStack and
    ipFamilies: [IPv6]. Bind addresses render as [::].
  • Invalid value: helm template --set ipFamily=invalid fails with error
    invalid ipFamily value "invalid" -- valid values: ipv4, ipv6, both.
  • Empty string: helm template --set ipFamily="" fails with the same
    validation error.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project (afaik :).
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added unit tests to cover my changes.

@jochenseeber jochenseeber requested a review from a team as a code owner March 31, 2026 10:59
@jochenseeber jochenseeber force-pushed the develop branch 2 times, most recently from 58f43c6 to c91ec10 Compare March 31, 2026 15:07
- "--cache-period={{ .Values.base.cache_poll_period }}"{{ if .Values.base.jaeger.enabled }}
- "--jaeger={{ include "jaeger_url" . }}"{{ end }}
- "--grpc-server-addr=[::]:50051"
- "--grpc-server-addr=[{{ include "bind_address" . }}]:50051"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work for ipv4? [0.0.0.0]:50051

IIRC this syntax is only supported on ipv6 or am I misremembering?

Signed-off-by: Jochen Seeber <jochen@seeber.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants